@import '@common/styles/index.scss';

@mixin uploadStyles {
  transition: all .5s;
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: $mask-bg-color;
  color: $white;
}

.userCenterEditHeader {
  position: relative;
  min-height: rem(284);
  border-bottom: 1px solid $spacer-bg-color;
  // background-color: pink;
  .headImgBox{
    position: absolute;
    left: 50%;
    top: rem(228);
    transform: translateX(-50%) translateY(-100%);
    .avatarWrap {
      max-width: none;
    }
    :global {
      .dzq-avatar {
        border: rem(3) solid;
        box-sizing: border-box;
      }
    }
  }
  .userCenterEditDec {
    position: absolute;
    bottom: rem(16);
    display: flex;
    padding: 0;
    justify-content: center;
    align-items: center;
    left: 0;
    right: 0;
    height: rem(20);
    line-height: rem(20);
    .text {
      // text-align: center;
      font-size: rem($font-size-base);
      text-overflow: -o-ellipsis-lastline;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      line-clamp: 2;
      -webkit-box-orient: vertical;
      line-height: 1.2;
      color: $text-color-primary;
      // margin-left: rem($margin-2n);
    }
    .userCenterEditDecItem {
      display: flex;
      padding: 0 rem($padding-4n);
      justify-content: center;
      align-items: center;
      :global {
        .dzq-input {
          width: 100%;
        }
      }
    }
    .compileIcon {
      margin-right: rem($margin-2n);
    }
    .userSignatureInput {
      height: rem(20);
      line-height: rem(20);
      display: flex;
      align-items: center;
      :global {
        .dzq-input__inner {
          width: 100%;
          line-height: 1;
          height: rem(20);
          border: none;
          line-height: rem(20);
          padding: 0;
        }
      }
    }
    .dzq-icon {
      color: $text-color-regular;
      font-size: rem($font-size-middle);
    }
  }
  .userCenterEditCameraIcon {
    position: absolute;
    width: rem(34);
    height: rem(34);
    background-color: $primary-color;
    border-radius: 50%;
    right: 0;
    bottom: 0;
    box-sizing: border-box;
    border: rem(2) solid $white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    :global {
      .dzq-icon {
        color: $white;
      }
    }
  }
}

// 上传样式
.uploadAvatar {
  @include uploadStyles();
  z-index: 0;
  .uploadText {
    margin-left: rem($margin-2n);
  }
}
.bgContent {
  position: relative;
  // 上传背景图片样式
  .uploadBgUrl {
    @include uploadStyles();
    z-index: 0;
    border-radius: 0;
    .uploadText {
      margin-left: rem($margin-2n);
    }
  }
}

.hiddenElement {
  position: absolute;
  z-index: -1;
  visibility: hidden;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

